# Generated by Django 5.0.6 on 2024-06-20 06:59

import api.models
import django.db.models.deletion
import phonenumber_field.modelfields
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Coords",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("latitude", models.DecimalField(decimal_places=8, max_digits=10)),
                ("longitude", models.DecimalField(decimal_places=8, max_digits=10)),
                ("height", models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name="Level",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "winter_lev",
                    models.CharField(
                        choices=[
                            ("4A", "winter"),
                            ("2A", "spring"),
                            ("1A", "summer"),
                            ("3A", "autumn"),
                        ],
                        default="4A",
                        max_length=2,
                    ),
                ),
                (
                    "spring_lev",
                    models.CharField(
                        choices=[
                            ("4A", "winter"),
                            ("2A", "spring"),
                            ("1A", "summer"),
                            ("3A", "autumn"),
                        ],
                        default="4A",
                        max_length=2,
                    ),
                ),
                (
                    "summer_lev",
                    models.CharField(
                        choices=[
                            ("4A", "winter"),
                            ("2A", "spring"),
                            ("1A", "summer"),
                            ("3A", "autumn"),
                        ],
                        default="4A",
                        max_length=2,
                    ),
                ),
                (
                    "autumn_lev",
                    models.CharField(
                        choices=[
                            ("4A", "winter"),
                            ("2A", "spring"),
                            ("1A", "summer"),
                            ("3A", "autumn"),
                        ],
                        default="4A",
                        max_length=2,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Users",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("email", models.EmailField(max_length=128)),
                ("last_name", models.CharField(max_length=128)),
                ("first_name", models.CharField(max_length=128)),
                ("patronymic", models.CharField(max_length=128)),
                (
                    "phone",
                    phonenumber_field.modelfields.PhoneNumberField(
                        blank=True, max_length=128, region=None
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Pereval",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("beauty_title", models.CharField(max_length=128)),
                ("title", models.CharField(max_length=128)),
                ("other_titles", models.CharField(max_length=128)),
                ("connect", models.CharField(max_length=128)),
                ("add_time", models.DateTimeField(auto_now_add=True, null=True)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("NW", "new"),
                            ("PN", "pending"),
                            ("AC", "accepted"),
                            ("RJ", "rejected"),
                        ],
                        default="NW",
                        max_length=2,
                    ),
                ),
                (
                    "coord_id",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE, to="api.coords"
                    ),
                ),
                (
                    "level",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="api.level"
                    ),
                ),
                (
                    "tourist_id",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="api.users"
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Images",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "image",
                    models.ImageField(
                        blank=True,
                        null=True,
                        upload_to=api.models.get_path_upload_photos,
                        verbose_name="picture",
                    ),
                ),
                ("title", models.CharField(max_length=128)),
                (
                    "pereval_id",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="images",
                        to="api.pereval",
                    ),
                ),
            ],
            options={
                "verbose_name": "pictures",
                "verbose_name_plural": "pictures",
            },
        ),
        migrations.CreateModel(
            name="PerevalAdded",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("beauty_title", models.CharField(max_length=255)),
                ("title", models.CharField(max_length=255)),
                ("other_titles", models.CharField(max_length=255)),
                ("connect", models.CharField(max_length=255)),
                ("add_time", models.DateTimeField(auto_now_add=True)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("new", "новый"),
                            ("pending", "в работе"),
                            ("accepted", "принято"),
                            ("rejected", "отклонено"),
                        ],
                        default="new",
                        max_length=8,
                    ),
                ),
                (
                    "coord_id",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE, to="api.coords"
                    ),
                ),
                (
                    "level",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="api.level"
                    ),
                ),
                (
                    "tourist_id",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="api.users"
                    ),
                ),
            ],
        ),
    ]
